package com.tanhua.manager.service;

import com.tanhua.domain.vo.AnalysisSummaryVo;
import com.tanhua.domain.vo.AnalysisUsersVo;
import com.tanhua.manager.api.db.AnalysisApi;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class AnalysisService {

    @Reference
    private AnalysisApi analysisApi;

    public ResponseEntity summary() {
        AnalysisSummaryVo vo = analysisApi.summary();

        return ResponseEntity.ok(vo);
    }

    public ResponseEntity users(Long sd, Long ed, Integer type) {
        AnalysisUsersVo vo = analysisApi.users(sd, ed, type);

        return ResponseEntity.ok(vo);
    }
}
